package com.itheima;

/**
 * @Auther: shiquan
 * @Date: 2024/10/24 - 10 - 24 -14:23
 */
public class MathDemo5 {
    //统计一个有多少个玫瑰数
    public static void main(String[] args) {
        int count =0;
        for (int i = 1; i < 10000; i++) {
            int ge =i%10;
            int shi =i/10%10;
            int bai =i/100%10;
            int qian =i/1000%10;
            if (ge*ge*ge*ge+shi*shi*shi*shi+bai*bai*bai*bai+qian*qian*qian*qian==i){
                System.out.println(i);
                count++;
            }

        }
        System.out.println(count);

    }
}
